|
Technote 1157Don't println to a SocketBy Jens Alfke |
CONTENTSDoes This Ring a Bell? |
A common cause of
deadlocks in client-server Java applications when running on
Mac OS stems from improper use of the |
Does This Ring A Bell?You've written a networked client application or applet that communicates with a server using either a standard Internet protocol like HTTP or FTP, or a custom protocol that uses a similar line-oriented syntax. Your application works fine on Windows and Unix, but when you run it on a Mac, the client gets stuck when it tries to receive a response from the server. If you check the server, you find that the thread communicating with your app is similarly blocked reading a command from the client. Chances are you've just run into a little-known Java networking gotcha (we've seen many reports of this from developers.) The bad news is that it's a bug in your app, not in MRJ. The good news is that it's easy to work around. |
Thanks to the usual suspects.